<?php
namespace app\manage\validate;

use think\Validate;

/**
 * 行为验证器
 * @package app\menus\validate
 * @author 
 */
class DailyType extends Validate
{
    //定义验证规则
    protected $rule = [
        'name|栏目标题'  => 'require',
        'pid|上级栏目'   => 'require|number',
    ];

    //定义验证提示
    protected $message = [
         'name.require' => '请输入栏目名称',
         'pid.require' => '请选择上级栏目',
        
    ];

    //定义验证场景
    protected $scene = [
        //更新
        'add'  =>  ['name'],
        'add_son'  =>  ['name','pid'],
    ];
}
